load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("@rules_cc//examples:experimental_cc_shared_library.bzl", "cc_shared_library")

cc_library(
    name = "calc",
    hdrs = [
        "calc.h",
    ],
    srcs = [
        "calc.cpp",
    ],
    strip_include_prefix = "//calc",
    deps = [
        "//adder",
    ],
    visibility = [
        "//visibility:public",
    ]
)

cc_shared_library(
    name = "calc-1.0.0",
    roots = [
        ":calc",
    ],
    static_deps = [
        "@//:__subpackages__",
    ],
    user_link_flags = [
        "-Wl,--version-script=$(location v1.lds)",
        "-Wl,-soname,libcalc.so.1",
    ],
    additional_linker_inputs = [
        "v1.lds",
    ],
    visibility = [
        "//visibility:public",
    ]
)